from django.conf import settings
from django.core.files.storage import Storage
class FastDFSStorage(Storage):
    """自定义文件存储系统，修改存储的方案"""
    def __init__(self, fdfs_base_url=None):
        # 传参则用实参  不传默认为setting中的参数
        self.fdfs_base_url = fdfs_base_url or settings.FDFS_BASE_URL
    def _open(self, name, mode='rb'):
        pass
    def _save(self, name, content):
        pass
    def url(self, name):
        return self.fdfs_base_url + name